﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace NesEmu.Explorer
{
    public sealed class LengthyOperation : IDisposable
    {
        private readonly Control _parentControl;

        public LengthyOperation(Control parentControl)
        {
            _parentControl = parentControl;
            _parentControl.Cursor = Cursors.WaitCursor;
        }

        public void Dispose()
        {
            _parentControl.Cursor = Cursors.Default;
        }
    }
}
